﻿
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BatchUpdateRoleStatus.aspx.cs" Inherits="TrainingWorkshop.MVPWebsite.Role.Views.BatchUpdateRoleStatus"
    Title="BatchUpdateRoleStatus" MasterPageFile="~/Shared/DefaultMaster.master" %>



     <%@ Import Namespace= "DataContracts" %>
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" Runat="Server">
<h1>
        Role List</h1>
    <asp:Panel ID="Panel1" runat="server" GroupingText = "Search Role">
    
      <table border="0" cellpadding="0" cellspacing="0" bgcolor="White">
                <tr>
                <td align="center" bgcolor="White" valign="middle" colspan="0" 
                        style="height: 25px; width: 70px;">
        Role Name</td>
       
        <td align="center" bgcolor="White" valign="middle" width="70" colspan="0" 
                        style="height: 25px">
        <asp:TextBox ID="txtrolename" runat="server"></asp:TextBox>
          </td>
        <td align="center" bgcolor="White" valign="middle" width="50" colspan="0" 
                        style="height: 25px"> Status</td>
     <td align="center" bgcolor="White" valign="middle" width="80" colspan="0" 
                        style="height: 25px">
        <asp:DropDownList ID="DropDownList1" runat="server">
        </asp:DropDownList></td>
        
     <td align="center" bgcolor="White" valign="middle" width="90" colspan="0" 
                        style="height: 25px">
       <asp:Button ID="btnsearch" runat="server" Text="Search" 
            onclick="btnsearch_Click" 
             Style="background-color: Transparent;background-image: url(../images/search.jpg); background-position: left center;background-repeat: no-repeat" 
             Width="88px"/>
</td>


                    <caption>
                       
                        <tr>
                            <td align="center" bgcolor="White" colspan="0" style="height: 25px; width: 70px;" 
                                valign="middle">
                                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                                    Style="background-color: Transparent; background-image: url(../images/search.jpg); background-position: left center; background-repeat: no-repeat" 
                                    Text="Advance Search" Width="141px" />
                            </td>
                        </tr>
                    </caption>
            </tr>
                </table>
               
  </asp:Panel>
   </br>
    </br>
     
    <asp:Panel ID="Panel2" runat="server" GroupingText = "Role List" Width="538px">

    <script language="javascript" type="text/jscript">
        function GetAllCheckBox(CheckAll) {

            var items = document.getElementsByTagName("input");
            for (i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    items[i].checked = CheckAll.checked;
                }
            }
        }
</script>
        <asp:Button ID="addrole" runat="server" Text="  Create New Role" Width="136px" 
            onclick="addrole_Click1" 
            Style="background-color: Transparent;background-image: url(../images/edit.jpg); background-position: left center;background-repeat: no-repeat"/>


        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btninuse" runat="server" Text="  BatchUpdate(in use)" 
            Width="159px" onclick="btninuse_Click" 
            Style="background-color: Transparent;background-image: url(../images/edit.jpg); background-position: left center;background-repeat: no-repeat"/>


        &nbsp; &nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnnouse" runat="server" Text="  BatchUpdate(no use)" 
            Width="160px" onclick="btnnouse_Click" 
            Style="background-color: Transparent;background-image: url(../images/edit.jpg); background-position: left center;background-repeat: no-repeat"/>


        <br />
       <div>
            <table border="1" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="center" bgcolor="#507CD1" height="25" valign="middle" width="50">
                        select</td>
                    <td align="center" bgcolor= "#507CD1" valign="middle" width="80">
                        Role Id</td>
                    <td align="center" bgcolor= "#507CD1" valign="middle" width="300">
                        Role Name</td>
                    <td align="center" bgcolor="#507CD1" valign="middle" width="150">
                        Status</td>
                    <td align="center" bgcolor="#507CD1" valign="middle" width="120">
                        Tool</td>
                </tr>
                <asp:Repeater ID="rptlist" runat="server" OnItemCommand="Repeater1_ItemCommand" 
                    OnItemDataBound="Repeater1_ItemDataBound">

                 <ItemTemplate>
                        <tr>
                            <td align="center" height="25" valign="middle" width="50">
                                <asp:CheckBox ID="chks" runat="server" />
                                <asp:HiddenField ID="HiddenField1" runat="server" 
                                    Value='<%# Eval("RoleId") %>' />
                            </td>
                            <td align="center" valign="middle" width="80">
                                <%# Eval("RoleId") %>
                            </td>
                            <td align="center" valign="middle" width="300">
                                <%# Eval("RoleName") %>
                            </td>
                            <td align="center" valign="middle" width="150">
                                <%# Eval("Status.StatusName")%>
                            </td>
                            <td align="center" valign="middle" width="200">
                                <asp:Button ID="btnupt" runat="server" CommandArgument='<%# Eval("RoleId") %>' 
                                    CommandName="upt" Text="Update" />
                                <asp:Button ID="btndel" runat="server" CommandArgument='<%# Eval("RoleId") %>' 
                                    CommandName="del" Text="Delete" />
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>

    </asp:Panel>
  
</asp:Content>
